var URL = require('url');
var myUrl = "http://www.abc.org:4000/aa/bb/?name=wzq&pwd=xyz"
var parsedUrl = URL.parse(myUrl);
console.log(parsedUrl);
console.log(URL.parse(myUrl, true));